<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Yii Blog Demo',

	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
            'application.models.*',
            'application.components.*',
            'application.components.oss.ALIOSS'
	),

	'defaultController'=>'login',
        'modules' => array(
            'webadmin' => array(
                'defaultController' => 'login'
            )
        ),
	// application components
	'components'=>array(
            'urlManager'=>array(
                'urlFormat'=>'path',
                'showScriptName' => false
            ),
            'smarty'=>array(
                'class'=>'application.extensions.CSmarty',
            ),
            'db'=>array(
                    'connectionString' => 'mysql:host='.$_SERVER['MYSQL_HOST'].';dbname='.$_SERVER['MYSQL_DBNAME'],
                    'emulatePrepare' => true,
                    'username' => $_SERVER['MYSQL_USER'],
                    'password' => $_SERVER['MYSQL_PWD'],
                    'charset' => 'utf8',
                    'tablePrefix' => '',
            ),
            'errorHandler'=>array(
                    // use 'site/error' action to display errors
                    'errorAction'=>'error',
            ),
            'log'=>array(
                    'class'=>'CLogRouter',
                    'routes'=>array(
                            array(
                                    'class'=>'CFileLogRoute',
                                    'levels'=>'error, warning',
                            ),
                            array(
                                'class'=>'CWebLogRoute',
                                'levels'=>'trace',     //����Ϊtrace
                                'categories'=>'system.db.*' //ֻ��ʾ������ݿ���Ϣ,������ݿ�����,��ݿ�ִ�����
                            ),
                    ),
            ),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>require(dirname(__FILE__).'/params.php'),
);